package com.btpn.custody.bean;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.sql.DataSource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Component;

import com.btpn.custody.common.Constant;
import com.btpn.custody.common.LogEvent;
import com.btpn.custody.dao.IArea;
import com.btpn.custody.dao.jdbc.ParameterSLA;
import com.btpn.custody.entity.Area;
import com.btpn.custody.web.m002.model.Param;
import com.btpn.infra.utils.MyCollectionUtils;

@Component("parameterBeans")
public class ParameterBeans {
	
	private final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(this.getClass());
	
	@Autowired
	private DataSource CustodyDataSource;
		
	@Autowired
	private IArea areaDaoHibernate;
	
	@Autowired
	private ParameterSLA parameterSLA;
	
	private Map<String, String> mID_TYPE;				// P0102
	private Map<String, String> mRELIGION;				// P0108
	private Map<String, String> mEDUCATION;				// P0109
	private Map<String, String> mCURRENT_INCOME;		// P0110
	private Map<String, String> mSOURCE_INCOME;			// P0111
	private Map<String, String> mPURPOSE;				// P0112
	private Map<String, String> mMARITAL_STATUS;		// P0118
	private Map<String, String> mHUB_AHLI_WARIS;		// P0124
	private Map<String, String> mLAP_KEUANGAN;			// P0137
	private Map<String, String> mHUB_DENGAN_BANK;		// P0140
	private Map<String, String> mLBU_GOL_NASABAH;		// P0141
	private Map<String, String> mHR_CUSTOMER;			// P0142
	private Map<String, String> mHR_BUSINESS;			// P0143
	private Map<String, String> mHR_COUNTRIES;			// P0144
	private Map<String, String> mHR_PRODUCT;			// P0145
	private Map<String, String> mADDITIONAL_INCOME;		// P0146
	private Map<String, String> mCOUNTRY;				// P0001
	private Map<String, String> mCST_TYPE;				// P0002
	private Map<String, String> mACC_TYPE;				// P0003
	private Map<String, String> mArea;
	
	private List<Param> lID_TYPE;				// P0102
	private List<Param> lRELIGION;				// P0108
	private List<Param> lEDUCATION;				// P0109
	private List<Param> lCURRENT_INCOME;		// P0110
	private List<Param> lSOURCE_INCOME;			// P0111
	private List<Param> lPURPOSE;				// P0112
	private List<Param> lMARITAL_STATUS;		// P0118
	private List<Param> lHUB_AHLI_WARIS;		// P0124
	private List<Param> lLAP_KEUANGAN;			// P0137
	private List<Param> lHUB_DENGAN_BANK;		// P0140
	private List<Param> lLBU_GOL_NASABAH;		// P0141
	private List<Param> lHR_CUSTOMER;			// P0142
	private List<Param> lHR_BUSINESS;			// P0143
	private List<Param> lHR_COUNTRIES;			// P0144
	private List<Param> lHR_PRODUCT;			// P0145
	private List<Param> lADDITIONAL_INCOME;		// P0146
	private List<Param> lCOUNTRY;				// P0001
	private List<Param> lCST_TYPE;				// P0002
	private List<Param> lACC_TYPE;				// P0003

	private boolean inProgress=false;
	
//	private Integer slaParam;
	
	
	/*
	 * PURPOSE : make list of Param for each CMT.TEMP_
	 */
	@SuppressWarnings("unchecked")
	public Boolean initialParameter(String user) {
		logger.info("<===== START WIRE PARAMETER =====>");
		
		mID_TYPE = new HashMap<String, String>();
		mRELIGION = new HashMap<String, String>();
		mEDUCATION = new HashMap<String, String>();
		mCURRENT_INCOME = new HashMap<String, String>();
		mSOURCE_INCOME = new HashMap<String, String>();
		mPURPOSE = new HashMap<String, String>();
		mMARITAL_STATUS = new HashMap<String, String>();
		mHUB_AHLI_WARIS = new HashMap<String, String>();
		mLAP_KEUANGAN = new HashMap<String, String>();
		mHUB_DENGAN_BANK = new HashMap<String, String>();
		mLBU_GOL_NASABAH = new HashMap<String, String>();
		mHR_CUSTOMER = new HashMap<String, String>();
		mHR_BUSINESS = new HashMap<String, String>();
		mHR_COUNTRIES = new HashMap<String, String>();
		mHR_PRODUCT = new HashMap<String, String>();
		mADDITIONAL_INCOME = new HashMap<String, String>();
		mCOUNTRY = new HashMap<String, String>();
		mCST_TYPE = new HashMap<String, String>();
		mACC_TYPE = new HashMap<String, String>();
		
		mArea = new HashMap<String, String>();
		
		int c_param=0, c_country=0, c_cst_type=0, c_acc_type=0;
		
		Connection cmtConn = null;
		PreparedStatement ps_cmt = null;
		Statement stmt = null;
		ResultSet rs = null;
		try {
			cmtConn = CustodyDataSource.getConnection();
			
			// 1. selcet from CMT.TBL_M_PARAM
			String query = "SELECT p.PARAM_TYPE, p.PARAM_CODE, p.PARAM_DESC FROM " + Constant.CMT_M_PARAM + " p WHERE p.PARAM_TYPE IN ('" +
					Constant.P0102 + "','" + 
					Constant.P0108 + "','" + 
					Constant.P0109 + "','" + 
					Constant.P0110 + "','" + 
					Constant.P0111 + "','" + 
					Constant.P0112 + "','" + 
					Constant.P0118 + "','" + 
					Constant.P0124 + "','" + 
					Constant.P0137 + "','" + 
					Constant.P0140 + "','" +					
					Constant.P0141 + "','" + 
					Constant.P0142 + "','" + 
					Constant.P0143 + "','" + 
					Constant.P0144 + "','" + 
					Constant.P0145 + "','" + 
					Constant.P0146 + "','" + 					
					Constant.P0001 + "','" + 
					Constant.P0002 + "','" + 
					Constant.P0003 +
					"')";
			
			stmt = cmtConn.createStatement();
			rs = stmt.executeQuery(query);
			while (rs.next()) {
				
				if (rs.getString("PARAM_TYPE").equals(Constant.P0102)) {	mID_TYPE.put(rs.getString("PARAM_CODE"), rs.getString("PARAM_DESC")); 			c_param++;}
				if (rs.getString("PARAM_TYPE").equals(Constant.P0108)) {	mRELIGION.put(rs.getString("PARAM_CODE"), rs.getString("PARAM_DESC")); 			c_param++;}
				if (rs.getString("PARAM_TYPE").equals(Constant.P0109)) {	mEDUCATION.put(rs.getString("PARAM_CODE"), rs.getString("PARAM_DESC")); 		c_param++;}
				if (rs.getString("PARAM_TYPE").equals(Constant.P0110)) {	mCURRENT_INCOME.put(rs.getString("PARAM_CODE"), rs.getString("PARAM_DESC"));	c_param++;}
				if (rs.getString("PARAM_TYPE").equals(Constant.P0111)) {	mSOURCE_INCOME.put(rs.getString("PARAM_CODE"), rs.getString("PARAM_DESC")); 	c_param++;}
				if (rs.getString("PARAM_TYPE").equals(Constant.P0112)) {	mPURPOSE.put(rs.getString("PARAM_CODE"), rs.getString("PARAM_DESC")); 			c_param++;}
				if (rs.getString("PARAM_TYPE").equals(Constant.P0118)) {	mMARITAL_STATUS.put(rs.getString("PARAM_CODE"), rs.getString("PARAM_DESC"));	c_param++;}
				if (rs.getString("PARAM_TYPE").equals(Constant.P0124)) {	mHUB_AHLI_WARIS.put(rs.getString("PARAM_CODE"), rs.getString("PARAM_DESC"));	c_param++;}
				if (rs.getString("PARAM_TYPE").equals(Constant.P0137)) {	mLAP_KEUANGAN.put(rs.getString("PARAM_CODE"), rs.getString("PARAM_DESC")); 		c_param++;}
				if (rs.getString("PARAM_TYPE").equals(Constant.P0140)) {	mHUB_DENGAN_BANK.put(rs.getString("PARAM_CODE"), rs.getString("PARAM_DESC")); 	c_param++;}
				if (rs.getString("PARAM_TYPE").equals(Constant.P0141)) {	mLBU_GOL_NASABAH.put(rs.getString("PARAM_CODE"), rs.getString("PARAM_CODE") + " - " + rs.getString("PARAM_DESC")); 	c_param++;}
				if (rs.getString("PARAM_TYPE").equals(Constant.P0142)) {	mHR_CUSTOMER.put(rs.getString("PARAM_CODE"), rs.getString("PARAM_DESC")); 		c_param++;}
				if (rs.getString("PARAM_TYPE").equals(Constant.P0143)) {	mHR_BUSINESS.put(rs.getString("PARAM_CODE"), rs.getString("PARAM_DESC")); 		c_param++;}
				if (rs.getString("PARAM_TYPE").equals(Constant.P0144)) {	mHR_COUNTRIES.put(rs.getString("PARAM_CODE"), rs.getString("PARAM_DESC")); 		c_param++;}
				if (rs.getString("PARAM_TYPE").equals(Constant.P0145)) {	mHR_PRODUCT.put(rs.getString("PARAM_CODE"), rs.getString("PARAM_DESC")); 		c_param++;}
				if (rs.getString("PARAM_TYPE").equals(Constant.P0146)) {	mADDITIONAL_INCOME.put(rs.getString("PARAM_CODE"), rs.getString("PARAM_DESC")); c_param++;}
				if (rs.getString("PARAM_TYPE").equals(Constant.P0001)) {	mCOUNTRY.put(rs.getString("PARAM_CODE"), rs.getString("PARAM_DESC"));			c_country++;}
				if (rs.getString("PARAM_TYPE").equals(Constant.P0002)) {	mCST_TYPE.put(rs.getString("PARAM_CODE"), rs.getString("PARAM_DESC"));			c_cst_type++;}
				if (rs.getString("PARAM_TYPE").equals(Constant.P0003)) {	mACC_TYPE.put(rs.getString("PARAM_CODE"), rs.getString("PARAM_CODE") + " - " + rs.getString("PARAM_DESC"));	c_acc_type++;}
			}
				
			// SORT
			mID_TYPE = MyCollectionUtils.sortByComparator(mID_TYPE);
			mRELIGION = MyCollectionUtils.sortByComparator(mRELIGION);
			mEDUCATION = MyCollectionUtils.sortByComparator(mEDUCATION);
			mCURRENT_INCOME = MyCollectionUtils.sortByComparator(mCURRENT_INCOME);
			mSOURCE_INCOME = MyCollectionUtils.sortByComparator(mSOURCE_INCOME);
			mPURPOSE = MyCollectionUtils.sortByComparator(mPURPOSE);
			mMARITAL_STATUS = MyCollectionUtils.sortByComparator(mMARITAL_STATUS);
			mHUB_AHLI_WARIS = MyCollectionUtils.sortByComparator(mHUB_AHLI_WARIS);
			mLAP_KEUANGAN = MyCollectionUtils.sortByComparator(mLAP_KEUANGAN);
			mHUB_DENGAN_BANK = MyCollectionUtils.sortByComparator(mHUB_DENGAN_BANK);
			mLBU_GOL_NASABAH = MyCollectionUtils.sortByComparator(mLBU_GOL_NASABAH);
			mHR_CUSTOMER = MyCollectionUtils.sortByComparator(mHR_CUSTOMER);
			mHR_BUSINESS = MyCollectionUtils.sortByComparator(mHR_BUSINESS);
			mHR_COUNTRIES = MyCollectionUtils.sortByComparator(mHR_COUNTRIES);
			mHR_PRODUCT = MyCollectionUtils.sortByComparator(mHR_PRODUCT);
			mADDITIONAL_INCOME = MyCollectionUtils.sortByComparator(mADDITIONAL_INCOME);
			mCOUNTRY = MyCollectionUtils.sortByComparator(mCOUNTRY);
			mCST_TYPE = MyCollectionUtils.sortByComparator(mCST_TYPE);
			mACC_TYPE = MyCollectionUtils.sortByComparator(mACC_TYPE);
			
			initAreaMap();
			
			int total = c_param + c_country + c_cst_type + c_acc_type;
			logger.info("<===== SUCCESS WIRE PARAMETER =====> DETAIL : Param[{}] Country[{}] CstType[{}] AccType[{}] = {}", new Object[] {c_param, c_country, c_cst_type, c_acc_type, total});
			
			// init SLA param
			Integer sla = parameterSLA.readValueByKey(Constant.P0004, Constant.PARAM_SLA);
			if (sla==null) {
				sla = parameterSLA.create(Constant.P0004, Constant.PARAM_SLA, Constant.DEFAULT_SLA_VALUE, user);
			}
			
			return true;
		} catch (SQLException e) {
			logger.error(LogEvent.GENERAL, e);
			return false;
		} finally {
			if (rs != null) {
				try {
					rs.close();
				} catch (SQLException e) {
					logger.error(LogEvent.CONNECTION__CLOSE, e);
				}
			}
			if (stmt!=null) {
				try {
					stmt.close();
				} catch (SQLException e) {
					logger.error(LogEvent.STATEMENT__CLOSE, e);
				}
			}
			if (ps_cmt!=null) {
				try {
					ps_cmt.close();
				} catch (SQLException e) {
					logger.error(LogEvent.PREP_STMT__CLOSE, e);
				}
			}
			if (cmtConn != null) {
				try {
					cmtConn.close();
				} catch (SQLException e) {
					logger.error(LogEvent.CONNECTION__CLOSE, e);
				}
			}
		}
	}
	
	@SuppressWarnings("unchecked")
	public void initAreaMap() {
		for (Area a : areaDaoHibernate.findAll()) {
			mArea.put(a.getId().toString(), a.getName());
		}
		mArea = MyCollectionUtils.sortByComparator(mArea);
	}
	
	public void initListParameterFromMap() {
		
		lID_TYPE = new ArrayList<Param>();
		lRELIGION = new ArrayList<Param>();
		lEDUCATION = new ArrayList<Param>();
		lCURRENT_INCOME = new ArrayList<Param>();
		lSOURCE_INCOME = new ArrayList<Param>();
		lPURPOSE = new ArrayList<Param>();
		lMARITAL_STATUS = new ArrayList<Param>();
		lHUB_AHLI_WARIS = new ArrayList<Param>();
		lLAP_KEUANGAN = new ArrayList<Param>();
		lHUB_DENGAN_BANK = new ArrayList<Param>();
		lLBU_GOL_NASABAH = new ArrayList<Param>();
		lHR_CUSTOMER = new ArrayList<Param>();
		lHR_BUSINESS = new ArrayList<Param>();
		lHR_COUNTRIES = new ArrayList<Param>();
		lHR_PRODUCT = new ArrayList<Param>();
		lADDITIONAL_INCOME = new ArrayList<Param>();
		lCOUNTRY = new ArrayList<Param>();
		lCST_TYPE = new ArrayList<Param>();
		lACC_TYPE = new ArrayList<Param>();
		
		for (Map.Entry<String, String> entry : mID_TYPE.entrySet()) {
			lID_TYPE.add(new Param(entry.getKey(), entry.getValue()));
        }
		for (Map.Entry<String, String> entry : mCOUNTRY.entrySet()) {
			lCOUNTRY.add(new Param(entry.getKey(), entry.getValue()));
        }
	}
	
	public Integer getSLAparam() {
		return parameterSLA.readValueByKey(Constant.P0004, Constant.PARAM_SLA);
	}
	
	public Integer updateSLAparam(Integer newValue) {
		
		String user = SecurityContextHolder.getContext().getAuthentication().getName();
		
		// init SLA param
		Integer sla = parameterSLA.readValueByKey(Constant.P0004, Constant.PARAM_SLA);
		if (sla==null) {
			return parameterSLA.create(Constant.P0004, Constant.PARAM_SLA, newValue, user);
		} else {
			return parameterSLA.update(Constant.P0004, Constant.PARAM_SLA, newValue, user);
		}			
	}
	
	public String getAccountTypeValue(String code) {
		return mACC_TYPE.get(code);
	}

	public String getCustomerTypeValue(String code) {
		return mCST_TYPE.get(code);
	}

	/*=============================================== G E T T E R   &   S E T T E R ===========================*/
	public Map<String, String> getmID_TYPE() {
		return mID_TYPE;
	}

	public void setmID_TYPE(Map<String, String> mID_TYPE) {
		this.mID_TYPE = mID_TYPE;
	}

	public Map<String, String> getmRELIGION() {
		return mRELIGION;
	}

	public void setmRELIGION(Map<String, String> mRELIGION) {
		this.mRELIGION = mRELIGION;
	}

	public Map<String, String> getmEDUCATION() {
		return mEDUCATION;
	}

	public void setmEDUCATION(Map<String, String> mEDUCATION) {
		this.mEDUCATION = mEDUCATION;
	}

	public Map<String, String> getmCURRENT_INCOME() {
		return mCURRENT_INCOME;
	}

	public void setmCURRENT_INCOME(Map<String, String> mCURRENT_INCOME) {
		this.mCURRENT_INCOME = mCURRENT_INCOME;
	}

	public Map<String, String> getmSOURCE_INCOME() {
		return mSOURCE_INCOME;
	}

	public void setmSOURCE_INCOME(Map<String, String> mSOURCE_INCOME) {
		this.mSOURCE_INCOME = mSOURCE_INCOME;
	}

	public Map<String, String> getmPURPOSE() {
		return mPURPOSE;
	}

	public void setmPURPOSE(Map<String, String> mPURPOSE) {
		this.mPURPOSE = mPURPOSE;
	}

	public Map<String, String> getmMARITAL_STATUS() {
		return mMARITAL_STATUS;
	}

	public void setmMARITAL_STATUS(Map<String, String> mMARITAL_STATUS) {
		this.mMARITAL_STATUS = mMARITAL_STATUS;
	}

	public Map<String, String> getmHUB_AHLI_WARIS() {
		return mHUB_AHLI_WARIS;
	}

	public void setmHUB_AHLI_WARIS(Map<String, String> mHUB_AHLI_WARIS) {
		this.mHUB_AHLI_WARIS = mHUB_AHLI_WARIS;
	}

	public Map<String, String> getmLAP_KEUANGAN() {
		return mLAP_KEUANGAN;
	}

	public void setmLAP_KEUANGAN(Map<String, String> mLAP_KEUANGAN) {
		this.mLAP_KEUANGAN = mLAP_KEUANGAN;
	}

	public Map<String, String> getmHUB_DENGAN_BANK() {
		return mHUB_DENGAN_BANK;
	}

	public void setmHUB_DENGAN_BANK(Map<String, String> mHUB_DENGAN_BANK) {
		this.mHUB_DENGAN_BANK = mHUB_DENGAN_BANK;
	}

	public Map<String, String> getmLBU_GOL_NASABAH() {
		return mLBU_GOL_NASABAH;
	}

	public void setmLBU_GOL_NASABAH(Map<String, String> mLBU_GOL_NASABAH) {
		this.mLBU_GOL_NASABAH = mLBU_GOL_NASABAH;
	}

	public Map<String, String> getmHR_CUSTOMER() {
		return mHR_CUSTOMER;
	}

	public void setmHR_CUSTOMER(Map<String, String> mHR_CUSTOMER) {
		this.mHR_CUSTOMER = mHR_CUSTOMER;
	}

	public Map<String, String> getmHR_BUSINESS() {
		return mHR_BUSINESS;
	}

	public void setmHR_BUSINESS(Map<String, String> mHR_BUSINESS) {
		this.mHR_BUSINESS = mHR_BUSINESS;
	}

	public Map<String, String> getmHR_COUNTRIES() {
		return mHR_COUNTRIES;
	}

	public void setmHR_COUNTRIES(Map<String, String> mHR_COUNTRIES) {
		this.mHR_COUNTRIES = mHR_COUNTRIES;
	}

	public Map<String, String> getmHR_PRODUCT() {
		return mHR_PRODUCT;
	}

	public void setmHR_PRODUCT(Map<String, String> mHR_PRODUCT) {
		this.mHR_PRODUCT = mHR_PRODUCT;
	}

	public Map<String, String> getmADDITIONAL_INCOME() {
		return mADDITIONAL_INCOME;
	}

	public void setmADDITIONAL_INCOME(Map<String, String> mADDITIONAL_INCOME) {
		this.mADDITIONAL_INCOME = mADDITIONAL_INCOME;
	}

	public Map<String, String> getmCOUNTRY() {
		return mCOUNTRY;
	}

	public void setmCOUNTRY(Map<String, String> mCOUNTRY) {
		this.mCOUNTRY = mCOUNTRY;
	}

	public Map<String, String> getmCST_TYPE() {
		return mCST_TYPE;
	}

	public void setmCST_TYPE(Map<String, String> mCST_TYPE) {
		this.mCST_TYPE = mCST_TYPE;
	}

	public Map<String, String> getmACC_TYPE() {
		return mACC_TYPE;
	}

	public void setmACC_TYPE(Map<String, String> mACC_TYPE) {
		this.mACC_TYPE = mACC_TYPE;
	}

	public Map<String, String> getmArea() {
		return mArea;
	}

	public void setmArea(Map<String, String> mArea) {
		this.mArea = mArea;
	}

	public List<Param> getlID_TYPE() {
		return lID_TYPE;
	}

	public void setlID_TYPE(List<Param> lID_TYPE) {
		this.lID_TYPE = lID_TYPE;
	}

	public List<Param> getlRELIGION() {
		return lRELIGION;
	}

	public void setlRELIGION(List<Param> lRELIGION) {
		this.lRELIGION = lRELIGION;
	}

	public List<Param> getlEDUCATION() {
		return lEDUCATION;
	}

	public void setlEDUCATION(List<Param> lEDUCATION) {
		this.lEDUCATION = lEDUCATION;
	}

	public List<Param> getlCURRENT_INCOME() {
		return lCURRENT_INCOME;
	}

	public void setlCURRENT_INCOME(List<Param> lCURRENT_INCOME) {
		this.lCURRENT_INCOME = lCURRENT_INCOME;
	}

	public List<Param> getlSOURCE_INCOME() {
		return lSOURCE_INCOME;
	}

	public void setlSOURCE_INCOME(List<Param> lSOURCE_INCOME) {
		this.lSOURCE_INCOME = lSOURCE_INCOME;
	}

	public List<Param> getlPURPOSE() {
		return lPURPOSE;
	}

	public void setlPURPOSE(List<Param> lPURPOSE) {
		this.lPURPOSE = lPURPOSE;
	}

	public List<Param> getlMARITAL_STATUS() {
		return lMARITAL_STATUS;
	}

	public void setlMARITAL_STATUS(List<Param> lMARITAL_STATUS) {
		this.lMARITAL_STATUS = lMARITAL_STATUS;
	}

	public List<Param> getlHUB_AHLI_WARIS() {
		return lHUB_AHLI_WARIS;
	}

	public void setlHUB_AHLI_WARIS(List<Param> lHUB_AHLI_WARIS) {
		this.lHUB_AHLI_WARIS = lHUB_AHLI_WARIS;
	}

	public List<Param> getlLAP_KEUANGAN() {
		return lLAP_KEUANGAN;
	}

	public void setlLAP_KEUANGAN(List<Param> lLAP_KEUANGAN) {
		this.lLAP_KEUANGAN = lLAP_KEUANGAN;
	}

	public List<Param> getlHUB_DENGAN_BANK() {
		return lHUB_DENGAN_BANK;
	}

	public void setlHUB_DENGAN_BANK(List<Param> lHUB_DENGAN_BANK) {
		this.lHUB_DENGAN_BANK = lHUB_DENGAN_BANK;
	}

	public List<Param> getlLBU_GOL_NASABAH() {
		return lLBU_GOL_NASABAH;
	}

	public void setlLBU_GOL_NASABAH(List<Param> lLBU_GOL_NASABAH) {
		this.lLBU_GOL_NASABAH = lLBU_GOL_NASABAH;
	}

	public List<Param> getlHR_CUSTOMER() {
		return lHR_CUSTOMER;
	}

	public void setlHR_CUSTOMER(List<Param> lHR_CUSTOMER) {
		this.lHR_CUSTOMER = lHR_CUSTOMER;
	}

	public List<Param> getlHR_BUSINESS() {
		return lHR_BUSINESS;
	}

	public void setlHR_BUSINESS(List<Param> lHR_BUSINESS) {
		this.lHR_BUSINESS = lHR_BUSINESS;
	}

	public List<Param> getlHR_COUNTRIES() {
		return lHR_COUNTRIES;
	}

	public void setlHR_COUNTRIES(List<Param> lHR_COUNTRIES) {
		this.lHR_COUNTRIES = lHR_COUNTRIES;
	}

	public List<Param> getlHR_PRODUCT() {
		return lHR_PRODUCT;
	}

	public void setlHR_PRODUCT(List<Param> lHR_PRODUCT) {
		this.lHR_PRODUCT = lHR_PRODUCT;
	}

	public List<Param> getlADDITIONAL_INCOME() {
		return lADDITIONAL_INCOME;
	}

	public void setlADDITIONAL_INCOME(List<Param> lADDITIONAL_INCOME) {
		this.lADDITIONAL_INCOME = lADDITIONAL_INCOME;
	}

	public List<Param> getlCOUNTRY() {
		return lCOUNTRY;
	}

	public void setlCOUNTRY(List<Param> lCOUNTRY) {
		this.lCOUNTRY = lCOUNTRY;
	}

	public List<Param> getlCST_TYPE() {
		return lCST_TYPE;
	}

	public void setlCST_TYPE(List<Param> lCST_TYPE) {
		this.lCST_TYPE = lCST_TYPE;
	}

	public List<Param> getlACC_TYPE() {
		return lACC_TYPE;
	}

	public void setlACC_TYPE(List<Param> lACC_TYPE) {
		this.lACC_TYPE = lACC_TYPE;
	}

	public boolean isInProgress() {
		return inProgress;
	}

	public void setInProgress(boolean inProgress) {
		this.inProgress = inProgress;
	}
}